package com.mdd.front.controller;

import com.mdd.common.core.AjaxResult;
import com.mdd.common.validator.annotation.IDMust;
import com.mdd.front.LikeFrontThreadLocal;
import com.mdd.front.service.IWxCustomerservice;
import com.mdd.front.vo.user.UserAddressVo;
import com.mdd.front.vo.wxcustomer.WxCustomerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/wxcustomer")
@Api(tags = "企业微信管理")
public class WxCustomerController {

    @Resource
    IWxCustomerservice wxCustomerservice;

    @GetMapping("/list")
    @ApiOperation(value = "企业微信客服集合")
    public AjaxResult<List<WxCustomerVo>> list(@Validated @IDMust() @RequestParam("shopId") Integer shopId) {
        List<WxCustomerVo> list= wxCustomerservice.getWxCustomerList( shopId);
        return AjaxResult.success(list);
    }
}
